import {StackActions, NavigationActions} from 'react-navigation'

export default class  {
  static resetHomePage(params) {
    const {navigation, selectedTab} = params
    const resetAction = StackActions.reset({
      index: 0,
      actions: [
        NavigationActions.navigate({
          routeName: 'HomePage',
          params: {
            selectedTab: selectedTab
          }
        })
      ]
    })
    navigation.dispatch(resetAction)
  }
}
